package com.aspose.cells;

class zadp extends zadn {
   private zot d;
   private com.aspose.cells.a.d.ze e;

   public zadp(zot var1, com.aspose.cells.a.d.ze var2) throws Exception {
      this.e = var2;
      this.d = var1;
      com.aspose.cells.b.a.b.zt var3;
      if ("\n".equals(this.d.a)) {
         this.d.a = "I";
         var3 = this.a(this.d);
         this.d.a = "";
         var3.a(0.0F);
      } else {
         var3 = this.a(var1);
      }

      this.a = var3.c();
      this.b = var3.b();
   }

   public void a(com.aspose.cells.a.d.zb[] var1, com.aspose.cells.b.a.b.zo var2) throws Exception {
      float var3 = var2.d();
      float var4 = var2.e();
      this.a(var1, this.d, new com.aspose.cells.b.a.b.zo(var3, var4));
   }

   private com.aspose.cells.b.a.b.zt a(zot var1) throws Exception {
      com.aspose.cells.a.d.zav var2 = this.b(var1);
      com.aspose.cells.a.d.zf var3 = new com.aspose.cells.a.d.zf(var2, Color.getBlack(), new com.aspose.cells.b.a.b.zo(0.0F, 0.0F), var1.a, var1.b.isSuperscript(), var1.b.isSubscript());
      this.c = var3.d().h();
      com.aspose.cells.b.a.b.zt var4 = new com.aspose.cells.b.a.b.zt(var2.j().c(var1.a, (float)var1.b.getDoubleSize()), (float)com.aspose.cells.a.d.zfq.a(var2.a(), var2.b(), "|", var2.c()).c() * 0.75F);
      return var4;
   }

   private void a(com.aspose.cells.a.d.zb[] var1, zot var2, com.aspose.cells.b.a.b.zo var3) throws Exception {
      com.aspose.cells.a.d.zav var4 = this.b(var2);
      if (var2.a.length() > 0) {
         Color var5 = Color.fromArgb(255, var2.b.getColor().getR() & 255, var2.b.getColor().getG() & 255, var2.b.getColor().getB() & 255);
         var2.a = var2.a.replace('\r', ' ');
         com.aspose.cells.a.d.zf var6 = new com.aspose.cells.a.d.zf(var4, var5, new com.aspose.cells.b.a.b.zo(var3.d(), var3.e()), var2.a, var2.b.isSuperscript(), var2.b.isSubscript());
         var6.c = var2.b.getUnderline();
         var1[0].a((com.aspose.cells.a.d.zl)var6);
      }

   }

   private com.aspose.cells.a.d.zav b(zot var1) throws Exception {
      float var2 = Math.max(1.0F, (float)var1.b.getDoubleSize());
      Color var3 = Color.a(255, (Color)var1.b.getColor());
      int var4 = (var1.b.isBold() ? 1 : 0) | (var1.b.isItalic() ? 2 : 0) | (var1.b.isStrikeout() ? 8 : 0) | (var1.b.getUnderline() != 0 ? 4 : 0);
      com.aspose.cells.a.d.zav var5 = com.aspose.cells.a.d.zav.a(var1.b.getName(), var2, var4);
      return var5;
   }
}
